/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package no.ffi.tpm.utils;

import iaik.tc.tss.impl.java.tsp.internal.TcTspProperties;
import java.io.File;
import java.net.URL;

/**
 *
 * @author fma
 */
public class Paths {
    public static void main(String[] args){
        String osName = System.getProperty("os.name");
		System.out.println(osName);
		//default path for Windows
		if(osName.contains("Windows")) {
			String appData = System.getenv("APPDATA");
			System.out.println(appData + "\\" + "jTSS");
		}
                System.out.println(System.getProperty("jtss.tsp.ini.file"));
		//default path for Linux
		if(osName.contains("Linux")) {
			String homePath = System.getProperty("user.home");
			System.out.println(homePath + File.separator + ".jTSS");
		}
		
		//default path rest
		System.out.println(System.getProperty("user.home") + File.separator + "jTSS");
                String classNameInJar = TcTspProperties.class.getName().replace(
					".", "/")
					+ ".class";
		System.out.println(classNameInJar);
                URL url = TcTspProperties.class.getClassLoader().getResource(classNameInJar);
               System.out.println(url.toString()); 
    }
}
